package io.github.kouleen.manager.listener.player;

import io.github.kouleen.minecraft.core.lang.annotation.MinecraftPluginListener;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerToggleFlightEvent;

/**
 * 玩家切换飞行状态则调用此事件
 * @author zhangqing
 * @since 2025/2/26 10:59
 */
@MinecraftPluginListener
public class PlayerToggleFlightListener implements Listener {

    @EventHandler
    public void onPlayerToggleFlightListener(PlayerToggleFlightEvent playerToggleFlightEvent){
        Player player = playerToggleFlightEvent.getPlayer();
        System.out.println(player.getName() + "触发了切换飞行状态");
    }
}
